package com.ma.service.goods;

import com.ma.dao.goods.GoodsMapper;
import com.ma.pojo.Goods;

import java.util.List;

public class GoodsServiceImpl implements GoodsService {
    private GoodsMapper goodsMapper;

    public void setGoodsMapper(GoodsMapper goodsMapper) {
        this.goodsMapper = goodsMapper;
    }

    @Override
    public int addGoods(Goods goods) {
        return goodsMapper.addGoods(goods);
    }

    @Override
    public int updateGoods(Goods goods) {
        return goodsMapper.updateGoods(goods);
    }

    @Override
    public int queryGoodsCount() {
        return goodsMapper.queryGoodsCount();
    }

    @Override
    public List<Goods> queryAllGoods() {
        return goodsMapper.queryAllGoods();
    }

    @Override
    public Goods queryByGoodsId(String goodsId) {
        return goodsMapper.queryByGoodsId(goodsId);
    }

    @Override
    public int deleteGoodById(String goodsId) {
        return goodsMapper.deleteGoodById(goodsId);
    }

    @Override
    public int queryGoodsTight() {
        return goodsMapper.queryGoodsTight();
    }
}
